class ChatMessage {
  String? senderId;
  String? receiverId;
  int? convType;
  int? cid;
  int? cmd;
  String? uuid;
  Object? message;

  ChatMessage({required this.senderId, this.receiverId,required this.cid,required this.cmd ,this.uuid,required this.convType, this.message});

  ChatMessage.fromJson(Map<String, dynamic> json) {
    senderId = json["senderId"];
    receiverId = json["receiverId"];
    cmd= json["cmd"];
    convType = json["convType"];
    cid = json["cid"] ?? 0;
    message = json["message"];
    uuid = json["uuid"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["senderId"] = senderId;
    _data["receiverId"] = receiverId;
    _data["convType"] = convType;
    _data["message"] = message;
    _data["cid"] = cid;
    _data["cmd"] = cmd;
    _data["uuid"] = uuid;
    return _data;
  }
}
